package controlling;

public class Exercise9 {
  
  public static void main(String[] args) {
    
    Fibonacci.search(54);
    
  }

}

class Fibonacci {
  
  
  
  public static void search(int x) {
    
    int m = 1;
    int n = 1;
    
    if (x < 1) {
      System.out.println("no number in this range");
      return;
    }
    
    System.out.print(m + ", " + n++);
    
  
    
    while (n <= x) {
      System.out.print(", " + n);
      n = n + m;
      m = n - m;
      
      
    }
      
    }
    
  }
  

